// 与vue2的里面的data一样，函数返回新对象防止多处共用同一对象,造成数据混乱
export const searchFormSchema: FormSchema[] = [

]

export const getFormSchema = (): FormSchema => ({
  formItem: [
    {
      type: 'input',
      label: '应用名称',
      field: 'name',
      value: '',
      props: {
        placeholder: '请输入应用名称'
      },
      rules: [
        {
          required: true,
          message: '应用名称不能为空'
        },
        {
          max: 100,
          message: '应用名称最多100字符'
        }
      ]
    },
    {
      type: 'input-number',
      label: '排序',
      field: 'seq',
      value: '',
      props: {
        placeholder: '请输入排序',
        min: 0,
        max: 9999,
      },
      rules: [
        {
          required: true,
          message: '排序不能为空'
        }
      ]
    },
    {
      type: 'input',
      label: '唯一编码',
      field: 'code',
      value: '',
      props: {
        placeholder: '请输入唯一编码'
      },
      rules: [
        {
          required: true,
          message: '唯一编码不能为空'
        },
        {
          max: 50,
          message: '唯一编码最多50字符'
        }
      ]
    },
    {
      type: 'input',
      label: '是否默认',
      field: 'active',
      value: 'N',
      hidden: true,
    },    
  ]
})
